package com.guanyong.dao;

import com.guanyong.model.PriceTagModel;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

/**
 * Created by mxk on 2017/5/31.
 */
public interface IPriceTagDaoMapper {

    @Select("SELECT * FROM t_ad_pricetag  where f_id=#{fId}")
    @ResultMap("PriceResultMap")
    PriceTagModel selectByPrimaryKey(String fId);

    @Select("SELECT * FROM t_ad_pricetag  where f_id in (${idlist})")
    @ResultMap("PriceResultMap")
    List<PriceTagModel> selectIdList(@Param("idlist") String idlist);

    @Select("SELECT * FROM t_ad_pricetag ")
    @ResultMap("PriceResultMap")
    List<PriceTagModel> selectAll();

    List<PriceTagModel> selectPriceTagList( @Param("name")String name,
                                            @Param("offset")Integer offset,
                                             @Param("limit") Integer limit);

    Integer selectPriceTagCount(@Param("name")String name);


    int insert(PriceTagModel record);

    int update(@Param(value = "record") PriceTagModel record);


}
